<template>
	<view class="">
		<Address :address="address"></Address>
		<Locality></Locality>
		<Content></Content>
		<!-- 发表 -->
		<view class="publish animate"><image src="../../static/tabImg/fab.png" mode="widthFix"></image></view>
	</view>
</template>

<script>
import Address from './compontents/address.vue';
import Content from './compontents/content.vue';
import Locality from './compontents/locality.vue';
import { addressdata } from '../../common/list.js';

export default {
	name: 'strategy',
	components: {
		Address,
		Content,
		Locality
	},
	data() {
		return {
			address: ''
		};
	},
	created() {
		// 定位
		this.addRess();
	},
	methods: {
		addRess() {
			addressdata()
				.then(res => {
					// console.log(res);
					this.address = res;
				})
				.catch(err => {
					// console.log(err);
					this.address = err;
				});
		}
	}
};
</script>

<style scoped>
/* 发表 */
.publish image {
	width: 120upx !important;
	height: 120upx !important;
	border-radius: 40upx;
}
.publish {
	position: fixed;
	bottom: 20upx;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	/* 动画 */
	animation: animate 1.5s ease;
	transform: translate3d(0, 0, 0);
}
/* 自己被迫设置动画 */
@keyframes animate {
	from {
		bottom: -20upx;
		opacity: 0.6;
	}
	to {
		bottom: 20upx;
		opacity: 1;
	}
}
</style>
